import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import request from '../src/utils/request'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'element-plus/dist/index.css'
// 暗黑模式
import 'element-plus/theme-chalk/dark/css-vars.css'
// 图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// 公共样式
import '@/assets/css/global.css'
import particles from 'particles.js'

let app = createApp(App);

app.config.globalProperties.$request = request // 自定义添加 vue3中使用

app.config.globalProperties.$baseUrl = process.env.VUE_APP_BASEURL // 自定义添加 vue3中使用

app.use(ElementPlus,{locale:zhCn})
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(store).use(router).mount('#app')

app.use(particles)